package togetherOne.dao;

import java.sql.SQLException;
import java.util.ArrayList;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import togetherOne.vo.CultureVo;

public class CultureDaoImpl extends SqlMapClientDaoSupport implements CultureDao {
	private Log log = LogFactory.getLog(getClass());
	
	public CultureDaoImpl(){
	}

	public ArrayList<String> getCulName(String culCate) throws SQLException{
		return (ArrayList<String>)getSqlMapClientTemplate().queryForList("culture.getCulNameByCulCate",culCate);
	}

	public void insertCul(CultureVo cul) throws SQLException{
		getSqlMapClientTemplate().insert("culture.insertCul",cul);
	}
	
	public ArrayList<String> getCulTimeByDate(CultureVo cul) throws SQLException{
	 return (ArrayList<String>) getSqlMapClientTemplate().queryForList("culture.getCulTimeByDate",cul);
	}
	
	public void deleteCulByNo(int culNo) throws SQLException{
		getSqlMapClientTemplate().delete("culture.deleteCulByNo",culNo);
	}
}
